//*****************************************************************************
// JFab (http://code.google.com/p/jfab)
// Copyright (c) 2011-2012 JFab.org
// Admin jfab@jeffreythompson.net
//
// See the file "LICENSE.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//*****************************************************************************

package org.jfab.swingui.editpane;

import java.beans.PropertyChangeListener;

/**
 * Defines methods required by an edit pane.
 * 
 * @param <T> Subject type.
 */
public interface EditPane<T>
{
    /**
     * @param listener Property change listener.
     */
    void addDataListener(final PropertyChangeListener listener);

    /**
     * Apply changes to the data object.
     */
    void applyChanges();

    /**
     * @return the subjectObject
     */
    T getSubjectObject();

    /**
     * @return true if the data has been changed.
     */
    boolean isDirty();

    /**
     * @param listener Property change listener.
     */
    void removeDataListener(final PropertyChangeListener listener);
}
